import { ref, onMounted } from 'vue';

export default function useVantHooks() {
	// 弹窗层
	const popup = ref(false);
	const showPopup = () => {
		popup.value = true;
	}
	
	// 日期选择器
	const calendar = ref(false);
	const calendarDate = ref([]);
	const showCalendar = () => {
		calendar.value = true;
	}
	const hideCalendar = (e) => {
		calendar.value = false;
		calendarDate.value = e
	}
	
	// 对外暴露的变量
	return {
		popup,
		showPopup,
		calendar,
		calendarDate,
		showCalendar,
		hideCalendar,
	}
}